package com.wkm.chainchain.consensusutils;

import lombok.extern.slf4j.Slf4j;
import org.yaml.snakeyaml.Yaml;

import java.io.InputStream;
import java.util.Map;

@Slf4j
public class YamlUtil {
    public Map<String, Integer> getYaml(String path) {
        Yaml yaml = new Yaml();
        InputStream in = this.getClass().getClassLoader().getResourceAsStream(path);
        return yaml.load(in);
    }
}
